export default function createCanvas(id: string) {
  const dom = document.getElementById(id) as HTMLCanvasElement
  const ctx = dom.getContext('2d') as CanvasRenderingContext2D
  dom.width = window.innerWidth
  dom.height = window.innerHeight
  dom.style.zIndex = '-1'
  dom.style.position = 'absolute'
  dom.style.top = '0'
  dom.style.left = '0'
  const bodyDom = document.body as HTMLBodyElement
  bodyDom.style.position = 'relative'
  function one() {
    // 外圈
    ctx.beginPath()
    ctx.moveTo(300, 300)
    ctx.arcTo(400, 300, 400, 400, 100)
    ctx.stroke()

    ctx.moveTo(300, 320)
    ctx.arcTo(380, 320, 380, 400, 80)
    ctx.stroke()
  }
  one()
}
